<!--********************************************************************
* Copyright© 2000 - 2018 SuperMap Software Co.Ltd. All rights reserved.
*********************************************************************-->
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title data-i18n="resources.title_vectorTileLayerNight"></title>
    <script type="text/javascript" src="../js/include-web.js"></script>
</head>
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
<script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script>
<script type="text" id="cartoCssStr">
        /*此处定义不同的颜色变量，在后面可以重复用这些颜色值*/
        @waterColor:rgb(24,24,24);
        @roadColora:rgb(109,102,91);
        @roadColorb:rgb(109,102,91);
        @railwayColora:rgb(80,80,80);
        @railwayColorb:rgb(137,137,137);
        @vegetationColor:rgb(27,27,27);
        @continentColor:rgb(34,34,34);
        @provinceLineColor:rgb(100,100,100);
        /*中国除外的其他国家的图层*/
        #World_Continent_pl___China{
            polygon-fill:@continentColor;
            line-width:1;
            line-color:@continentColor;
        }
        #China_Province_pl___China{
            polygon-fill:@continentColor;
            line-color:rgba(0,0,0,0);
        }
        #Arterial_Road_ln___China::one{
            line-color:@roadColora;
            line-width:2
        }
        #Arterial_Road_ln___China::two{
            line-color:@roadColorb;
            line-width:1
        }
        #Arterial_Road_ln___China___1::one{
            line-color:@roadColora;
            line-width:2
        }
        #Arterial_Road_ln___China___1::two{
            line-color:@roadColorb;
            line-width:1
        }
        #Arterial_Road_ln___China___1___1::one{
            line-color:@roadColora;
            line-width:2
            }
        #Arterial_Road_ln___China___1___1::two{
            line-color:@roadColorb;
            line-width:1
        }
        #Main_Road_L___China::one{
            line-color:@roadColora;
            line-width:2
        }
        #Main_Road_L___China::two{
            line-color:@roadColorb;
            line-width:1;
        }
        #Main_Road_L___China___3{
            line-color:@roadColora;
            line-width:2
        }
        #Main_Road_L___China___1::one{
            line-color:@roadColora;
            line-width:2;
        }
        #Main_Road_L___China___1::two{
            line-color:@roadColorb;
            line-width:1;
        }
        #Main_Road_L___China___1___1::a{
            line-color:@roadColora;
            line-width:2;
        }
        #Main_Road_L___China___1___1::b{
            line-color:@roadColorb;
            line-width:1;
        }

        #China_Provinces_L___China{
            line-dasharray:10,10;
            line-color:@provinceLineColor;
            line-width:1;
        }


</script>
<script type="text/javascript">
    var host = window.isLocal ? window.server : "http://support.supermap.com.cn:8090";
    var map, layer,
        url = host + "/iserver/services/map-china400/rest/maps/China";
    map = L.map('map', {
        center: [39.89, 116.43],
        maxZoom: 12,
        zoom: 11
    });
    var cartoCSS = document.getElementById("cartoCssStr").text;
    layer = L.supermap.tiledVectorLayer(url, {
        cacheEnabled: true,
        cartoCSS: cartoCSS,
        serverCartoCSSStyle: false,
        attribution: "Tile Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> with <span>© <a href='http://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>"
    }).addTo(map);

</script>
</body>
</html>